Setting the correct size of vertex cache

GPUs have a vertex cache of a certain size. Accessing mesh vertices from the cache is an order of magnitude faster than accessing vertices from elsewhere in the memory. You can optimize the mesh data for a certain cache size by reordering vertices and indices in the vertex buffer so that the amount of cache hits is optimal.

For example, a 16 byte vertex cache can store Position + Normal + Texcoord (XYZ * 2 + XYZ * 2 + UV * 2), but is too small to store Position + Normal + Texcoord + Color.

Kanzi internally interleaves the vertex data to a half-float (2 byte) format.

To set the correct size of vertex cache for your target hardware:

  1. Find out the vertex cache size of your target hardware.
  2. In the Project select the root of your project and in the Properties set the values of the Binary Export Details properties to reflect the capacity of your target hardware.

See also

Reducing the number of rendered vertices

Setting culling

Loading resources in parallel

Measuring the performance of your Kanzi application

Best practices